home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
APDL Eductation Resources
/
APDL Eductation Resources.iso
/
programs
/
electronic
/
rlab
/
!RLaB
/
examples
/
fib
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1994-02-21
|
278 b
|
24 lines
//
// Calculate Fibonacci numbers
//
"Starting the fibonacci test..."
i=1;
while ( i < 2 ) {
i=i+1;
a=0; b=1;
while ( b < 10000 ) {
c = b;
b = a+b;
a = c;
}
}
b
if ( b != 10946 ) {
error("failed fibonacci test");
else
"...passed fibonacci test..."
}